#include "oled_windows.h"
#include "oled.h"

extern char oled_line;
extern char key1_status;
extern char key2_status;
extern char key3_status;


void window_menu_line1(void)
{
	oled_line = 1;
	OLED_Clear();
	OLED_ShowChinese(30,0,0,16,1);//住
	OLED_ShowChinese(48,0,1,16,1);//户
	OLED_ShowChinese(66,0,2,16,1);//管
	OLED_ShowChinese(84,0,3,16,1);//理
	
	OLED_ShowChinese(0,16,25,12,0);//住
	OLED_ShowChinese(12,16,26,12,0);//户
	OLED_ShowChar(24,16,49,12,0);//1
	OLED_ShowChar(72,16,50,12,0);//2
	OLED_ShowChar(78,16,52,12,0);//4
	OLED_ShowChar(84,16,48,12,0);//0
	OLED_ShowChar(90,16,49,12,0);//1
	
	OLED_ShowChinese(0,28,25,12,1);//住
	OLED_ShowChinese(12,28,26,12,1);//户
	OLED_ShowChar(24,28,50,12,1);//2
	OLED_ShowChar(72,28,50,12,1);//2
	OLED_ShowChar(78,28,52,12,1);//4
	OLED_ShowChar(84,28,48,12,1);//0
	OLED_ShowChar(90,28,50,12,1);//2
	
	OLED_ShowChinese(0,40,25,12,1);//住
	OLED_ShowChinese(12,40,26,12,1);//户
	OLED_ShowChar(24,40,51,12,1);//3
	OLED_ShowChar(72,40,50,12,1);//2
	OLED_ShowChar(78,40,52,12,1);//4
	OLED_ShowChar(84,40,48,12,1);//0
	OLED_ShowChar(90,40,51,12,1);//3
	
	OLED_Refresh();
}

void window_menu_line2(void)
{
	oled_line = 2;
	OLED_Clear();
	OLED_ShowChinese(30,0,0,16,1);//住
	OLED_ShowChinese(48,0,1,16,1);//户
	OLED_ShowChinese(66,0,2,16,1);//管
	OLED_ShowChinese(84,0,3,16,1);//理
	
	OLED_ShowChinese(0,16,25,12,1);//住
	OLED_ShowChinese(12,16,26,12,1);//户
	OLED_ShowChar(24,16,49,12,1);//1
	OLED_ShowChar(72,16,50,12,1);//2
	OLED_ShowChar(78,16,52,12,1);//4
	OLED_ShowChar(84,16,48,12,1);//0
	OLED_ShowChar(90,16,49,12,1);//1
	
	OLED_ShowChinese(0,28,25,12,0);//住
	OLED_ShowChinese(12,28,26,12,0);//户
	OLED_ShowChar(24,28,50,12,0);//2
	OLED_ShowChar(72,28,50,12,0);//2
	OLED_ShowChar(78,28,52,12,0);//4
	OLED_ShowChar(84,28,48,12,0);//0
	OLED_ShowChar(90,28,50,12,0);//2
	
	OLED_ShowChinese(0,40,25,12,1);//住
	OLED_ShowChinese(12,40,26,12,1);//户
	OLED_ShowChar(24,40,51,12,1);//3
	OLED_ShowChar(72,40,50,12,1);//2
	OLED_ShowChar(78,40,52,12,1);//4
	OLED_ShowChar(84,40,48,12,1);//0
	OLED_ShowChar(90,40,51,12,1);//3
	
	OLED_Refresh();


}
void window_menu_line3(void)
{
	oled_line = 3;
	OLED_Clear();
	OLED_ShowChinese(30,0,0,16,1);//住
	OLED_ShowChinese(48,0,1,16,1);//户
	OLED_ShowChinese(66,0,2,16,1);//管
	OLED_ShowChinese(84,0,3,16,1);//理
	
	OLED_ShowChinese(0,16,25,12,1);//住
	OLED_ShowChinese(12,16,26,12,1);//户
	OLED_ShowChar(24,16,49,12,1);//1
	OLED_ShowChar(72,16,50,12,1);//2
	OLED_ShowChar(78,16,52,12,1);//4
	OLED_ShowChar(84,16,48,12,1);//0
	OLED_ShowChar(90,16,49,12,1);//1
	
	OLED_ShowChinese(0,28,25,12,1);//住
	OLED_ShowChinese(12,28,26,12,1);//户
	OLED_ShowChar(24,28,50,12,1);//2
	OLED_ShowChar(72,28,50,12,1);//2
	OLED_ShowChar(78,28,52,12,1);//4
	OLED_ShowChar(84,28,48,12,1);//0
	OLED_ShowChar(90,28,50,12,1);//2
	
	OLED_ShowChinese(0,40,25,12,0);//住
	OLED_ShowChinese(12,40,26,12,0);//户
	OLED_ShowChar(24,40,51,12,0);//3
	OLED_ShowChar(72,40,50,12,0);//2
	OLED_ShowChar(78,40,52,12,0);//4
	OLED_ShowChar(84,40,48,12,0);//0
	OLED_ShowChar(90,40,51,12,0);//3
	
	OLED_Refresh();
}

void window_login(void)//登录界面
{
	oled_line = 1;
	OLED_Clear();
	OLED_ShowChinese(30,0,8,16,1);//登
	OLED_ShowChinese(48,0,9,16,1);//录
	OLED_ShowChinese(66,0,10,16,1);//界
	OLED_ShowChinese(84,0,11,16,1);//面
	
	OLED_ShowChinese(0,30,23,12,1);//密
	OLED_ShowChinese(12,30,24,12,1);//码
	OLED_ShowChar(24,30,58,12,1);//:
	
	OLED_Refresh();
}

void window_device_status(void)//设备状态界面
{
	oled_line = 1;
	OLED_Clear();	
	OLED_ShowChinese(30,0,4,16,1);//设
	OLED_ShowChinese(48,0,5,16,1);//备
	OLED_ShowChinese(66,0,6,16,1);//状
	OLED_ShowChinese(84,0,7,16,1);//态

	OLED_ShowChar(8,16,76,12,1);//L
	OLED_ShowChar(14,16,69,12,1);//E
	OLED_ShowChar(20,16,68,12,1);//D
	OLED_ShowChar(32,16,58,12,1);//:
	
	OLED_ShowChinese(66,16,11,12,1);//风
	OLED_ShowChinese(78,16,12,12,1);//扇
	OLED_ShowChar(90,16,58,12,1);//:

	OLED_ShowChinese(8,30,9,12,1);//温
	OLED_ShowChinese(20,30,8,12,1);//度
	OLED_ShowChar(32,30,58,12,1);//:

	OLED_ShowChinese(66,30,10,12,1);//湿
	OLED_ShowChinese(78,30,8,12,1);//度
	OLED_ShowChar(90,30,58,12,1);//:

	OLED_ShowChinese(8,44,5,12,1);//光
	OLED_ShowChinese(20,44,6,12,1);//照
	OLED_ShowChinese(32,44,7,12,1);//强
	OLED_ShowChinese(44,44,8,12,1);//度
	OLED_ShowChar(56,44,58,12,1);//:
	OLED_Refresh();
}



//void drv_window_root_line1(void)
//{
//	line = 0;
//	OLED_Clear();
//	OLED_ShowChinese(30,0,27,16,1);//管
//	OLED_ShowChinese(48,0,28,16,1);//理
//	OLED_ShowChinese(66,0,29,16,1);//员
//	OLED_ShowChinese(84,0,21,16,1);//界
//	OLED_ShowChinese(102,0,22,16,1);//面
//	
//	OLED_ShowChinese(0,16,30,12,0);//查
//	OLED_ShowChinese(12,16,31,12,0);//询
//	OLED_ShowChinese(24,16,6,12,0);//住
//	OLED_ShowChinese(36,16,7,12,0);//户
//	OLED_ShowChinese(48,16,32,12,0);//状
//	OLED_ShowChinese(60,16,33,12,0);//态
//
//	OLED_ShowChinese(0,28,34,12,1);//修
//	OLED_ShowChinese(12,28,35,12,1);//改
//	OLED_ShowChinese(24,28,36,12,1);//密
//	OLED_ShowChinese(36,28,37,12,1);//码
//	OLED_Refresh();
//
//}
//
//void drv_window_root_line2(void)
//{
//	line = 1;
//	OLED_Clear();
//	OLED_ShowChinese(30,0,27,16,1);//管
//	OLED_ShowChinese(48,0,28,16,1);//理
//	OLED_ShowChinese(66,0,29,16,1);//员
//	OLED_ShowChinese(84,0,21,16,1);//界
//	OLED_ShowChinese(102,0,22,16,1);//面
//	
//	OLED_ShowChinese(0,16,30,12,1);//查
//	OLED_ShowChinese(12,16,31,12,1);//询
//	OLED_ShowChinese(24,16,6,12,1);//住
//	OLED_ShowChinese(36,16,7,12,1);//户
//	OLED_ShowChinese(48,16,32,12,1);//状
//	OLED_ShowChinese(60,16,33,12,1);//态
//
//	OLED_ShowChinese(0,28,34,12,0);//修
//	OLED_ShowChinese(12,28,35,12,0);//改
//	OLED_ShowChinese(24,28,36,12,0);//密
//	OLED_ShowChinese(36,28,37,12,0);//码
//	OLED_Refresh();
//
//}
//
//void drv_window_user_line1(void)
//{
//	line = 0;
//	OLED_Clear();
//	OLED_ShowChinese(30,0,0,16,1);//住
//	OLED_ShowChinese(46,0,1,16,1);//户
//	OLED_ShowChinese(62,0,21,16,1);//界
//	OLED_ShowChinese(78,0,22,16,1);//面
//	
//	OLED_ShowChinese(0,16,30,12,0);//查
//	OLED_ShowChinese(12,16,31,12,0);//询
//	OLED_ShowChinese(24,16,6,12,0);//住
//	OLED_ShowChinese(36,16,7,12,0);//户
//	OLED_ShowChinese(48,16,32,12,0);//状
//	OLED_ShowChinese(60,16,33,12,0);//态
//
//	OLED_ShowChinese(0,28,34,12,1);//修
//	OLED_ShowChinese(12,28,35,12,1);//改
//	OLED_ShowChinese(24,28,36,12,1);//密
//	OLED_ShowChinese(36,28,37,12,1);//码
//	OLED_Refresh();
//
//}
//
//void drv_window_user_line2(void)
//{
//	line = 1;
//	OLED_Clear();
//	OLED_ShowChinese(30,0,0,16,1);//住
//	OLED_ShowChinese(46,0,1,16,1);//户
//	OLED_ShowChinese(62,0,21,16,1);//界
//	OLED_ShowChinese(78,0,22,16,1);//面
//	
//	OLED_ShowChinese(0,16,30,12,1);//查
//	OLED_ShowChinese(12,16,31,12,1);//询
//	OLED_ShowChinese(24,16,6,12,1);//住
//	OLED_ShowChinese(36,16,7,12,1);//户
//	OLED_ShowChinese(48,16,32,12,1);//状
//	OLED_ShowChinese(60,16,33,12,1);//态
//
//	OLED_ShowChinese(0,28,34,12,0);//修
//	OLED_ShowChinese(12,28,35,12,0);//改
//	OLED_ShowChinese(24,28,36,12,0);//密
//	OLED_ShowChinese(36,28,37,12,0);//码
//	OLED_Refresh();
//
//}


